package com.caocaog.market.data.transfer.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caocaog.market.modules.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @Author scott
 * @since 2018-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_user")
@ApiModel(value="mysql库中的sys_user对象", description="分站（代理商）用户信息，sqlserver库的cc_user表中的数据迁移过来后会存在该表中")
public class MkSysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="登录账号")
    private String username;

    @ApiModelProperty(value="真实姓名")
    private String realname;
    /**
     * 密码
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value="密码，经过jeecgboot加密")
    private String password;
    /**
     * md5密码盐
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value="密码加密所用到的密码盐")
    private String salt;
    /**
     * 性别（1：男 2：女）
     */
    @Dict(dicCode = "sex")
    @ApiModelProperty(value="性别（1：男 2：女）")
    private Integer sex;

    @ApiModelProperty(value="电话")
    private String phone;
    /**
     * 分站id
     */
    @ApiModelProperty(value="分站id")
    private String siteId;

    @Dict(dicCode = "user_status")
    @ApiModelProperty(value="状态(1：正常  2：冻结 ）")
    private Integer status;

    @ApiModelProperty(value="身份（0 普通成员 1 上级），分站用户全部存为普通成员（0）")
    private Integer userIdentity;

    @ApiModelProperty(value="用户类型，分站用户的类型全部存为2")
    private Integer userType;

    @ApiModelProperty(value="当前选择的门店id")
    private String currentSelectedShopId;

}
